Optimal. Leaf size=25 \[ \frac{i a (c-i c \tan (e+f x))^2}{2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.059842, antiderivative size = 36, normalized size of antiderivative = 1.44, number of steps used = 4, number of rules used = 4, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.138, Rules used = {3522, 3486, 3767, 8} \[ \frac{a c^2 \tan (e+f x)}{f}-\frac{i a c^2 \sec ^2(e+f x)}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3522
Rule 3486
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int (a+i a \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx &=(a c) \int \sec ^2(e+f x) (c-i c \tan (e+f x)) \, dx\\ &=-\frac{i a c^2 \sec ^2(e+f x)}{2 f}+\left (a c^2\right ) \int \sec ^2(e+f x) \, dx\\ &=-\frac{i a c^2 \sec ^2(e+f x)}{2 f}-\frac{\left (a c^2\right ) \operatorname{Subst}(\int 1 \, dx,x,-\tan (e+f x))}{f}\\ &=-\frac{i a c^2 \sec ^2(e+f x)}{2 f}+\frac{a c^2 \tan (e+f x)}{f}\\ \end{align*}
Mathematica [A] time = 0.122822, size = 45, normalized size = 1.8 \[ \frac{a c^2 \left (-i \tan ^2(e+f x)-2 \tan ^{-1}(\tan (e+f x))+2 \tan (e+f x)+2 f x\right )}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.002, size = 27, normalized size = 1.1 \begin{align*}{\frac{a{c}^{2} \left ( \tan \left ( fx+e \right ) -{\frac{i}{2}} \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.70676, size = 43, normalized size = 1.72 \begin{align*} \frac{-i \, a c^{2} \tan \left (f x + e\right )^{2} + 2 \, a c^{2} \tan \left (f x + e\right )}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.11279, size = 88, normalized size = 3.52 \begin{align*} \frac{2 i \, a c^{2}}{f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.654952, size = 49, normalized size = 1.96 \begin{align*} \frac{2 i a c^{2} e^{- 4 i e}}{f \left (e^{4 i f x} + 2 e^{- 2 i e} e^{2 i f x} + e^{- 4 i e}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.37031, size = 47, normalized size = 1.88 \begin{align*} \frac{2 i \, a c^{2}}{f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]